<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>常见问题 | share-open</title>
    <meta name="description" content="函数库，工具库">
    <link rel="stylesheet" href="/share-open/assets/style.25a24194.css">
    <link rel="modulepreload" href="/share-open/assets/app.a7d6c65a.js">
    <link rel="modulepreload" href="/share-open/assets/guide_faq.md.e345ea62.lean.js">
    
    <link rel="icon" href="/share-open/favicon.ico">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <meta name="keywords" content="@minionorg,share,函数库,工具库">
  <meta name="twitter:title" content="常见问题 | share-open">
  <meta property="og:title" content="常见问题 | share-open">
  </head>
  <body>
    <div id="app"><div class="layout"><header class="layout-header-wrap clearfix"><div class="logo"><a href="/share-open/">minionorg share</a></div><ul class="menu-navs clearfix"><li class="nav-item"><a href="/share-open/guide/introduction">指南</a></li><li class="nav-item"><a href="/share-open/ArrayUtils/add">功能</a></li></ul></header><div class="layout-main"><div class="layout-siderbar"><div class="withoutScroll siderbar-wrap"><ul class="siderbar"><!--[--><!--]--></ul></div></div><div class="layout-container"><div class="content chestnut-doc"><div style="position:relative;"><div><h2 id="常见问题" tabindex="-1">常见问题 <a class="header-anchor" href="#常见问题" aria-hidden="true">#</a></h2><p>以下整理了一些常见的问题，在提问之前建议找找有没有类似的问题。</p><h3 id="编辑器的终端无法使用" tabindex="-1">编辑器的终端无法使用 <a class="header-anchor" href="#编辑器的终端无法使用" aria-hidden="true">#</a></h3><p>如果出现以下情况</p><div class="language-bash"><pre><code>chestnut-cli <span class="token builtin class-name">:</span> 无法加载文件 （这是路径），因为在此系统上禁止运行脚本。有关详细信息<span class="token punctuation">..</span>.
</code></pre></div><p>因为这涉及到电脑权限的问题，可以尝试执行以下操作：</p><ol><li><p>以管理员身份运行<strong>Windows PowerShell</strong></p></li><li><p>然后运行以下命令</p><div class="language-bash"><pre><code>get-ExecutionPolicy
</code></pre></div></li><li><p>如果出现结果为：<strong>Restricted</strong>（表示状态是禁止）</p></li><li><p>然后接着执行以下命令</p><div class="language-bash"><pre><code>set-ExecutionPolicy RemoteSigned
</code></pre></div></li><li><p>然后选择<strong>Y</strong>，继续执行查看命令：</p><div class="language-bash"><pre><code>get-ExecutionPolicy
</code></pre></div></li><li><p>如果输出：<strong>RemoteSigned</strong>（表示修改成功）</p></li></ol><p>如果以上操作无法解决，请自行查阅相关资料</p><h3 id="eslint-问题" tabindex="-1">ESLint 问题 <a class="header-anchor" href="#eslint-问题" aria-hidden="true">#</a></h3><ul><li>这有可能是因为你的项目上的某些 package 包跟当前安装的 eslint 以及相关插件包发生了冲突导致，需要根据实际情况去更改版本</li><li>有可能是.eslintrc.js 等配置文件跟你的项目有冲突，比如本工具提供的是含有 vue3 的功能，你可以是 vue2，那么需要根据实际情况去更换</li></ul><p>因为不可能做到适应所有的项目需求</p><h3 id="eslint-的规则" tabindex="-1">ESLint 的规则 <a class="header-anchor" href="#eslint-的规则" aria-hidden="true">#</a></h3><p>本工具提供的只是一个模板，如果需要更多规则或者更改规则，可以自行修改</p><h3 id="commitizen-安装问题" tabindex="-1">commitizen 安装问题 <a class="header-anchor" href="#commitizen-安装问题" aria-hidden="true">#</a></h3><p>这个包本工具提供的是全局安装的方式，但是由于 Mac 跟 Windows 有差异，如果是<strong>Mac</strong>，那么可能会有权限的问题导致在执行<strong>Commiit Message Style</strong> 配置的时候会失败，那么请自行用 sudo 的方式全局安装这个包，然后再重新执行配置命令</p><h3 id="关于-git-的钩子不生效问题" tabindex="-1">关于 Git 的钩子不生效问题 <a class="header-anchor" href="#关于-git-的钩子不生效问题" aria-hidden="true">#</a></h3><p>在选择<strong>Git Hooks</strong>配置完成后</p><p><strong>查看根目录下<code>.husky</code>的文件夹中是否存在下划线<code>_</code>这个文件夹，如果不存在，请执行一次以下命令：</strong></p><div class="language-bash"><pre><code>npx husky <span class="token function">install</span>
</code></pre></div><p><strong>如果你的电脑是 Mac，那么有可能会出现权限问题：</strong></p><ul><li>如果根目录下<code>.husky</code>的文件夹中存在<code>pre-commit</code>这个文件，请删除，然后执行:<div class="language-bash"><pre><code>npx husky <span class="token function">add</span> .husky/pre-commit <span class="token string">&quot;npx lint-staged&quot;</span>
</code></pre></div></li><li>如果根目录下<code>.husky</code>的文件夹中存在<code>commit-msg</code>这个文件，请删除，然后执行:<div class="language-bash"><pre><code>npx husky <span class="token function">add</span> .husky/commit-msg <span class="token string">&quot;npx --no-install commitlint --edit <span class="token variable">$1</span>&quot;</span>
</code></pre></div></li></ul></div></div><div class="layout-antorns"><div class="antorns-wrap"><div class="antorn-container"><div class="antorn-line"><span style="top:8px;" class="antorn-line-i"></span></div><ul class="antorn-list"><!--[--><li class=""><a data-href="#常见问题" href="#常见问题">常见问题</a></li><li class=""><a data-href="#编辑器的终端无法使用" href="#编辑器的终端无法使用">编辑器的终端无法使用</a></li><li class=""><a data-href="#eslint-问题" href="#eslint-问题">ESLint 问题</a></li><li class=""><a data-href="#eslint-的规则" href="#eslint-的规则">ESLint 的规则</a></li><li class=""><a data-href="#commitizen-安装问题" href="#commitizen-安装问题">commitizen 安装问题</a></li><li class=""><a data-href="#关于-git-的钩子不生效问题" href="#关于-git-的钩子不生效问题">关于 Git 的钩子不生效问题</a></li><!--]--></ul></div></div></div></div></div></div><div class="footer" data-v-151d3a08><div class="container" data-v-151d3a08><div class="footer-main" data-v-151d3a08><h5 data-v-151d3a08>@minionorg Design</h5><!--[--><a href="http://minionorg.gitee.io/cli-open" class="footer-main-link" target="_blank" data-v-151d3a08><span data-v-151d3a08>@minionorg/cli</span><span class="sub" data-v-151d3a08> - </span><span class="sub" data-v-151d3a08>前端项目工程化工具</span></a><!--]--></div><div class="footer-main" data-v-151d3a08><h5 data-v-151d3a08>社区</h5><a href="http://minionorg.gitee.io/minionorg-issue-helper/?repo=minionorg/share-open" class="footer-main-link" target="_blank" data-v-151d3a08>问题收集</a></div><div class="footer-main" data-v-151d3a08><h5 data-v-151d3a08>友情链接</h5><a href="https://vue3js.cn/docs/zh/" class="footer-main-link" target="_blank" data-v-151d3a08>Vue</a><a href="https://cli.vuejs.org/" class="footer-main-link" target="_blank" data-v-151d3a08>Vue CLI</a></div></div><p class="for-the-record" data-v-151d3a08><img alt="NPM" src="https://img.shields.io/npm/l/@minionorg/share?color=%231890ff&amp;registry_uri=https%3A%2F%2Fregistry.npmjs.com&amp;style=flat-square" data-v-151d3a08><img alt="Copyright" src="https://img.shields.io/badge/©-Copyright 2021 @minionorg/share-1890ff?style=flat-square&amp;logo=copyright&amp;logoColor=white" data-v-151d3a08></p></div></div></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"arrayutils_add.md\":\"6deecd3f\",\"arrayutils_addall.md\":\"55eece57\",\"arrayutils_clone.md\":\"4861e879\",\"arrayutils_remove.md\":\"ff78e67e\",\"arrayutils_toadded.md\":\"1c00a41a\",\"arrayutils_toremoved.md\":\"dfa2bc36\",\"charutils_compare.md\":\"a49b40e9\",\"charutils_isascii.md\":\"b8e8f522\",\"charutils_isasciialpha.md\":\"55f449d7\",\"charutils_isasciialphalower.md\":\"71cfade1\",\"charutils_isasciialphaupper.md\":\"3623a931\",\"charutils_isasciialphanumeric.md\":\"9e3163fa\",\"charutils_isasciicontrol.md\":\"beaf1b1b\",\"charutils_isasciinumeric.md\":\"ffaac4d7\",\"charutils_isasciiprintable.md\":\"21d03c6e\",\"charutils_iswhitespace.md\":\"44019c6e\",\"charutils_tochar.md\":\"a31cabfe\",\"charutils_tointvalue.md\":\"73fa4b55\",\"charutils_unicodeescaped.md\":\"23f56a51\",\"charutils_unicodeunescaped.md\":\"5e6f56fb\",\"dateutils_adddays.md\":\"e3fb0a93\",\"dateutils_addhours.md\":\"137c2a56\",\"dateutils_addminutes.md\":\"9fe32149\",\"dateutils_addmonths.md\":\"c1de5e6a\",\"dateutils_addsecs.md\":\"e0284dbe\",\"dateutils_addtime.md\":\"9ebf28e4\",\"dateutils_addyears.md\":\"cdb141ab\",\"dateutils_dateformathoc.md\":\"9665993b\",\"dateutils_getdateperiod.md\":\"010bc227\",\"dateutils_getdaysinmonth.md\":\"1058cb00\",\"dateutils_getfirstdateinmonth.md\":\"dedd0259\",\"dateutils_getlastdateinmonth.md\":\"fedca4f1\",\"dateutils_isdate.md\":\"19516b89\",\"dateutils_isleapyear.md\":\"7828d157\",\"dateutils_istime.md\":\"783f4aa6\",\"dateutils_timeformathoc.md\":\"76d49464\",\"dateutils_toisostring.md\":\"fdf9ef22\",\"numberutils_isfloat.md\":\"5b816b10\",\"numberutils_isinteger.md\":\"de99664c\",\"objectutils_allnotnull.md\":\"b9b03ff7\",\"objectutils_isempty.md\":\"57556d9a\",\"stringutils_abbreviate.md\":\"038ad8d5\",\"stringutils_contains.md\":\"37ff6cb2\",\"stringutils_equals.md\":\"5a240cbb\",\"stringutils_equalsany.md\":\"647c7ef8\",\"stringutils_equalsanyignorecase.md\":\"27419718\",\"stringutils_equalsignorecase.md\":\"88ee8bca\",\"stringutils_escapehtml.md\":\"7a0954e3\",\"stringutils_getstrlength.md\":\"f0cf809b\",\"stringutils_isanyempty.md\":\"2779df63\",\"stringutils_isen.md\":\"c17f4c14\",\"stringutils_isempty.md\":\"9c8a150e\",\"stringutils_iszh.md\":\"c489f0c0\",\"stringutils_length.md\":\"78b6a6ea\",\"stringutils_ltrim.md\":\"c9b1e5ff\",\"stringutils_rtrim.md\":\"2fc38725\",\"stringutils_startswith.md\":\"e16ef76e\",\"stringutils_strip.md\":\"94b449d1\",\"stringutils_stripall.md\":\"6c40f579\",\"stringutils_stripend.md\":\"0478dead\",\"stringutils_stripstart.md\":\"3f1932eb\",\"stringutils_striptoempty.md\":\"04549992\",\"stringutils_striptonull.md\":\"151b9b53\",\"stringutils_substring.md\":\"22a15930\",\"stringutils_substringafter.md\":\"a9d44462\",\"stringutils_substringafterlast.md\":\"8d51f18a\",\"stringutils_substringbefore.md\":\"fbffbaec\",\"stringutils_substringbeforelast.md\":\"96084028\",\"stringutils_substringbetween.md\":\"3e984b85\",\"stringutils_substringsbetween.md\":\"88661f94\",\"stringutils_trim.md\":\"1b170683\",\"stringutils_trimtoempty.md\":\"0f0974cd\",\"stringutils_trimtonull.md\":\"4c22a2d9\",\"stringutils_truncate.md\":\"debe512b\",\"stringutils_unescapehtml.md\":\"36f51783\",\"stringutils_uppercase.md\":\"ce31c73b\",\"stringutils_wrap.md\":\"7cb14ec4\",\"stringutils_wrapifmissing.md\":\"31ec6fa3\",\"utils_createtype.md\":\"c2aa6cab\",\"utils_geturlvaluebykey.md\":\"e32b9492\",\"utils_getvalue.md\":\"8ad16fff\",\"utils_hasemoji.md\":\"1214bfef\",\"utils_isemail.md\":\"2d35a693\",\"utils_isipv4.md\":\"b61c470f\",\"utils_isipv4range.md\":\"2a671d55\",\"utils_isipv6.md\":\"a04e5903\",\"utils_isipv6range.md\":\"26a82ee6\",\"utils_ismobile.md\":\"8586d0c6\",\"utils_isphone.md\":\"afa53472\",\"utils_isport.md\":\"2d70abf3\",\"utils_ispostalcode.md\":\"dfd1ee80\",\"utils_queryurlparams.md\":\"0cb29beb\",\"utils_validatetypehoc.md\":\"8749b24d\",\"guide_faq.md\":\"e345ea62\",\"guide_introduction.md\":\"98cf75ba\",\"guide_quickstart.md\":\"ab7970f9\",\"index.md\":\"2ba42b4c\"}")</script>
    <script type="module" async src="/share-open/assets/app.a7d6c65a.js"></script>
    
  </body>
</html>